package com.hypo.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_category")
public class GoodCategory {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String name;
    private Integer sort;
    @TableField(value = "parent_id")
    private Integer parentId;
    @TableField(value = "create_by")
    private String createBy;
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    //子级
    @TableField(exist = false)
    private List<GoodCategory> children;
}

